import {Injectable} from '@angular/core';
import {HttpService} from '@kylin/http';

@Injectable()
export class LoginService {
    constructor(private http: HttpService) {

    }

    doLogin(info): Promise<any> {
        return this.http.post('/oauth/user/token', {
            ...info, 'scope': 'app', 'clientId': 'system',
            'clientSecret': 'system',
            'grantType': 'password'
        })
    }
}
